import { MessageQueue } from "./finaldemo";
import { framework } from "./framework";
import { Animal, Cat, Dog } from './interfacedemo';

namespace app{
    import LogMgr = framework.LogMgr

    class App{
        public static main(){
            LogMgr.info("running")
            LogMgr.error("running")
        }
    }

    export function runApp(){
        App.main()
    }
}

function runApp() {
    // final demo
    let msgs: string[] = ['1231', '131']
    MessageQueue.create(msgs)

    // interface demo
    let animal: Animal = new Cat()
    animal.sleep(1)
    animal.eat("food")

    animal = new Dog()
    animal.sleep(1)
    animal.eat("food")

    app.runApp()
}

runApp()